package com.nbsaas.boot.project.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import com.nbsaas.boot.jpa.data.entity.User;
import com.nbsaas.boot.rest.enums.StoreState;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.Data;


@FormAnnotation(title = "任务评论管理", model = "任务评论", menu = "1,88,91")
@Data
@Entity
@Table(name = "nb_project_task_comment")
public class ProjectTaskComment extends AbstractEntity {

    @SearchItem(label = "任务名称", name = "taskName", key = "task.name")
    @FieldName
    @FieldConvert
    @FormField(title = "任务", sortNum = "1", grid = true, width = "260", type = InputType.select, option = "projectTask")
    @ManyToOne(fetch = FetchType.LAZY)
    private ProjectTask task;

    @FieldName
    @FieldConvert
    @FormField(title = "评论人", sortNum = "2", grid = true)
    @ManyToOne(fetch = FetchType.LAZY)
    private User user;

    private StoreState storeState;

    @FormField(title = "评论名称", sortNum = "3", grid = false)
    private String note;
}
